package com.pinoc.demo.common.response;

import com.pinoc.demo.enums.ReturnCode;

import lombok.Data;

/**
 * @author: yinpeng10
 */
@Data
public class Response<T> {
	private int code;

	private String msg;

	private T data;

	public Response(T data) {
		this(ReturnCode.SUCCESS, data);
	}

	public Response(ReturnCode returnCode, T data) {
		this.code = returnCode.getCode();
		this.msg = returnCode.getMsg();
		this.data = data;
	}
}
